// src/components/PluginDetailDrawer/index.less
@import '@/styles/color';
@import '@/styles/token';

.pluginDetailDrawer {
  :global {
    .ant-drawer-body {
      padding: 0;
      display: flex;
      flex-direction: column;
      height: 100%;
    }
  }
}

.resetRoot {
  :global {
    .ant-drawer-content-wrapper {
      border-radius: 16px;
      overflow: hidden !important;
      margin: 16px;
    }
  }
}

.resetMask {
  background-color: transparent !important;
}

.drawerHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 24px 0;
}

.titleArea {
  display: flex;
  align-items: center;
  position: relative;
}

.titleContent {
  display: flex;
  flex-direction: column;
}

.title {
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 22px !important;
  font-weight: normal;
  color: #3a3f4f;
}

.subtitle {
  font-size: 12px;
  color: #757b8d;
  line-height: 22px;
}

.closeButton {
  padding: 0;
  height: 32px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content {
  flex: 1;
  padding: 16px 24px;
  //overflow-y: auto;
}

.description {
  margin-top: 16px !important;
  margin-bottom: 16px !important;
  color: #6a7185;
  line-height: 18px;
  font-size: 12px;
}

.divider {
  margin: 16px 0;
}

.section {
  margin-bottom: 24px;
}

.sectionTitle {
  font-size: 14px !important;
  line-height: 22px !important;
  font-weight: normal;
  color: #3a3f4f;
  margin-bottom: 12px !important;
}

.docContent {
  color: #6a7185;
  font-size: 12px;
  margin-bottom: 12px !important;
  line-height: 28px;
  word-wrap: break-word;
  word-break: break-all;

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: @fontWeightStrong;
    font-size: 14px;
    line-height: 1.5;
  }

  h1 {
    font-size: calc(1.143 * 24px);
  }

  h2 {
    font-size: calc(1.143 * 20px);
  }

  h3 {
    font-size: calc(1.143 * 16px);
  }

  img {
    display: inline-block;
    margin: 0 auto;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
  }

  ol {
    padding-inline-start: 10px;
  }

  hr {
    visibility: hidden;
  }

  pre {
    box-sizing: border-box;
    white-space: pre-wrap;
    word-break: break-word;
    background-color: #fafafa;
    padding: 10px;
    margin: 0;
    overflow-x: auto;
    border-radius: 4px;
  }
}

.footer {
  padding: 16px 24px;
  border-top: 1px solid @GRAY08;
}

.updateButton {
  margin-bottom: 12px;
  height: 40px;
}

.disableButton {
  color: @GRAY04;
  background-color: @GRAY09;
  border-color: @GRAY08;
  height: 40px;
}

.actions {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  gap: 12px;
  padding: 16px 24px;
}

.toolSection {
  width: calc(100% - 24px);
  margin-left: 12px;
  margin-right: 12px;
  padding: 16px 12px 125px;
  position: absolute;
  border-radius: 16px 16px 0 0;
  background-color: #f3f5f9;
  z-index: 9;
  left: 0;
  bottom: -999px;
  transition: bottom 0.3s ease-in-out;

  &.enabledToolSection {
    bottom: 0;
  }
}

.newVersion {
  color: #f44c76;
  font-size: 12px;
  font-weight: normal;
  margin-left: 12px;
}

.iconWrapper {
  position: relative;
  flex-shrink: 0;
  margin-right: 12px;
}

.icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.activated-icon {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
}
